<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('退款订单列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>null：</p>
                                <input type="text" name="payOrderId"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelPayOrderNo"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="mchId"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="mchRefundNo"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelId"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="payAmount"/>
                            </li>
                            <li>
                                <p>退款金额,单位分：</p>
                                <input type="text" name="refundAmount"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="currency"/>
                            </li>
                            <li>
                                <p>退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成：</p>
                                <select name="status">
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <p>退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败：</p>
                                <input type="text" name="result"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="clientIp"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="device"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelUser"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="username"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelMchId"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelOrderNo"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelErrCode"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="channelErrMsg"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="notifyurl"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="param1"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="param2"/>
                            </li>
                            <li class="select-time">
                                <p>订单失效时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginExpireTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endExpireTime]"/>
                            </li>
                            <li class="select-time">
                                <p>订单退款成功时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginRefundSuccTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endRefundSuccTime]"/>
                            </li>
                            <li>
                                <p>租户ID：</p>
                                <input type="text" name="tenantId"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:refundorder:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:refundorder:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:refundorder:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:refundorder:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:refundorder:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:refundorder:remove')}]];
        var prefix = ctx + "system/refundorder";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "退款订单",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'refundOrderId', 
                    title : 'null',
                    visible: false
                },
                {
                    field : 'payOrderId', 
                    title : 'null'
                },
                {
                    field : 'channelPayOrderNo', 
                    title : 'null'
                },
                {
                    field : 'mchId', 
                    title : 'null'
                },
                {
                    field : 'mchRefundNo', 
                    title : 'null'
                },
                {
                    field : 'channelId', 
                    title : 'null'
                },
                {
                    field : 'payAmount', 
                    title : 'null'
                },
                {
                    field : 'refundAmount', 
                    title : '退款金额,单位分'
                },
                {
                    field : 'currency', 
                    title : 'null'
                },
                {
                    field : 'status', 
                    title : '退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成'
                },
                {
                    field : 'result', 
                    title : '退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败'
                },
                {
                    field : 'clientIp', 
                    title : 'null'
                },
                {
                    field : 'device', 
                    title : 'null'
                },
                {
                    field : 'remark', 
                    title : 'null'
                },
                {
                    field : 'channelUser', 
                    title : 'null'
                },
                {
                    field : 'username', 
                    title : 'null'
                },
                {
                    field : 'channelMchId', 
                    title : 'null'
                },
                {
                    field : 'channelOrderNo', 
                    title : 'null'
                },
                {
                    field : 'channelErrCode', 
                    title : 'null'
                },
                {
                    field : 'channelErrMsg', 
                    title : 'null'
                },
                {
                    field : 'extra', 
                    title : 'null'
                },
                {
                    field : 'notifyurl', 
                    title : 'null'
                },
                {
                    field : 'param1', 
                    title : 'null'
                },
                {
                    field : 'param2', 
                    title : 'null'
                },
                {
                    field : 'expireTime', 
                    title : '订单失效时间'
                },
                {
                    field : 'refundSuccTime', 
                    title : '订单退款成功时间'
                },
                {
                    field : 'tenantId', 
                    title : '租户ID'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.refundOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.refundOrderId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>